"""init_db

修订 ID: 3a0f19b79fb5
父修订: 
创建时间: 2023-10-20 15:57:02.554864

"""
from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

revision: str = "3a0f19b79fb5"
down_revision: str | Sequence[str] | None = None
branch_labels: str | Sequence[str] | None = "nonebot_plugin_shindan"
depends_on: str | Sequence[str] | None = None


def upgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "nonebot_plugin_shindan_shindanrecord",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("shindan_id", sa.String(length=32), nullable=False),
        sa.Column("command", sa.Text(), nullable=False),
        sa.Column("title", sa.Text(), nullable=False),
        sa.Column("mode", sa.String(length=32), nullable=False),
        sa.PrimaryKeyConstraint(
            "id", name=op.f("pk_nonebot_plugin_shindan_shindanrecord")
        ),
    )
    # ### end Alembic commands ###


def downgrade(name: str = "") -> None:
    if name:
        return
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("nonebot_plugin_shindan_shindanrecord")
    # ### end Alembic commands ###
